home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr26
/
netprog.zip
/
NETPROG.TAR
/
fd.s5
/
sendfile.c
< prev
Wrap
C/C++ Source or Header
|
1989-12-17
|
363b
|
19 lines
/*
* Pass a file descriptor to another process.
* Return 0 if OK, otherwise return the errno value from the I_SENDFD ioctl.
*/
#include <sys/types.h>
#include <stropts.h>
int
sendfile(strfd, fd)
int strfd; /* stream pipe to pass descriptor on */
int fd; /* the actual fd value to pass */
{
if (ioctl(strfd, I_SENDFD, fd) < 0)
return(-1);
return(0);
}